#ifndef INCLUDES_H
#define INCLUDES_H

#include "board.h"

#include "version.h"
#include "string_extend.h"
#include "app_device.h"
#include "comm_apply.h"
#include "gui.h"
#include "app_pd.h"
#include "dap_main.h"

#undef EXTERN
#ifndef APP_INIT_C
#define EXTERN extern
#else
#define EXTERN
#endif

enum{
    kSysEvent_ParaChange = 1<<0,  
    kSysEvent_UIParaChange = 1<<1,
    kSysEvent_LoadOE = 1<<2,
    kSysEvent_FUSB302_INT  = 1<<3,
    kSysEvent_CDC_RX = 1<<4,
    kSysEvent_UIDaplinkChange = 1<<5,
    kSysEvent_GUILoad = 1<<6,
    kSysEvent_PowerOV = 1<<7,
};

EXTERN SemaphoreHandle_t xSemaphoreSample;
EXTERN EventGroupHandle_t sys_event;
EXTERN EventGroupHandle_t pd_event;

extern uint8_t app_init_flag;
extern uint32_t lcd_sleep_time;

extern void app_init(void);
extern void app_timer_task(uint16_t tick);
extern void app_create_task(void *para);
extern void task_led(void *para);
extern void task_power(void *para);
extern void task_cdc(void *para);
extern void task_gui(void *para);
extern void task_comm(void * para);
extern void task_pc(void *para);
extern void task_pd(void *para);
extern void task_dap(void *para);
#endif
